<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">

<script type="text/javascript" src="../js/checkItemInfo.js">
</script>

<head>
    <meta charset="UTF-8">
    <title>MyPetstore</title>
</head>
<body>
<div th:replace="common/admintop"></div>

<div id="Content">

    <div id="BackLink">
        <a th:href="@{/admin/viewItems(productId=${editItem.product.productId})}">Back</a>
    </div>

    <p align="center"><font color="red" th:text="${failMsg}">failMsg</font></p>
    <p align="center"><font color="green" th:text="${editMsg}">editMsg</font></p>

    <div id="Catalog">
        <form action="/admin/editItem" method="post">
            <h3>Item Information</h3>

            <table class="rwd-table">
                <tr>
                    <td>Original ID:</td>
                    <td><input type="text" style="background-color:transparent;border:0;color:#ffffff;font-size:15px"
                               name="itemId" readonly="readonly" th:value="${editItem.itemId}"></td>
                </tr>
                <tr>
                    <td>New Id:</td>
                    <td><input type="text" name="editId"/></td>
                </tr>
                <tr>
                    <td>Description:</td>
                    <td><input type="text" name="attribute1" th:value="${editItem.attribute1}"/></td>
                </tr>
                <tr>
                    <td>List Price:</td>
                    <td><input type="text" name="listPrice" th:value="${editItem.listPrice}"/></td>
                </tr>
                <tr>
                    <td>Quantity:</td>
                    <td><input type="text" name="stockQuantity" th:value="${editItem.stockQuantity}"/></td>
                </tr>
            </table>

            <p align="center"><font color="red" name="errormsg"></font></p>

            <input onclick=" return check()" type="submit" name="editItem" value="Save Item Information"/>


        </form>
    </div>
</div>
<div th:replace="common/bottom"></div>
</body>
</html>